package com.zxy;

import org.apache.streampark.flink.connector.kafka.source.KafkaJavaSource;
import org.apache.streampark.flink.core.StreamEnvConfig;

import org.apache.streampark.flink.core.scala.StreamingContext;

public class KafkaConsume {
    public static void main(String[] args) {
        StreamEnvConfig envConfig = new StreamEnvConfig(args, null);
        StreamingContext context = new StreamingContext(envConfig);

        new KafkaJavaSource<String>(context)
                .getDataStream()
                .map(stringKafkaRecord -> stringKafkaRecord.value())
                .print();

        context.start();
    }
}
